<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Query Result</title>
	</head>
	<body>
		<center>人力资源档案查询</center>
		<table border="1" align="center">
			<tr>
				<td>档案编号</td>
				<td>姓名</td>
				<td>性别</td>
				<td>职位名称</td>
				<td>查看明细</td>
			</tr>
			<%
				ArrayList list = (ArrayList)request.getAttribute("list");
				for(int i=0;i<list.size();i++){
	            	if(i%4==0){
	                	out.println("<tr>");
	            	}
					if(i%4<3) {
						out.println("<td>"+list.get(i)+"</td>");
					}else {	                						
	                	out.println("<td>"+list.get(i)+"</td>");
	                	out.println("<td>"+"<a href='#'>查看</a>"+"</td>");
	                	out.println("</tr>");
	                	//out.println("<td>"+查看+"</td>");
	            	}
	        	}
			%>  
		</table>
	</body>
</html>